$(function(){
    $("[complianceType='delete']").click(function(){
        debugger
        var dataAction = $(this).attr("dataAction");
        var url = baseUrl + dataAction;
        var data = $('table:first').getCheckData();
        if(!data){
            layer.msg("请定义data");
            return;
        }
        if(data.length < 1 ){
            layer.msg("请选择数据");
            return;
        }
        layer.confirm('确定要删除么', {
            btn : [ '确定', '取消' ]//按钮
        }, function() {
            debugger
            $.ajax({
                cache: true,
                type: "POST",
                url:url,
                async: false,
                processData: true,
                data:data[0],
                error: function(request) {
                    console.log(request);
                    alert("Connection error");
                },
                success:function(){
                    $('table:first').ECDATable();
                    layer.closeAll();
                }
            });
        },function(){
            layer.closeAll();
        });
    });
})